package com.ktjy.ktmall.entity;

import java.util.List;

/**
 * 分类实体类对象
 * @version v1.0
 * @Author 郴州科泰
 * @Create 2024-07-18 - 17:24
 */
public class CategoryItem {
    private int id;  // 分类id
    private int categoryLevel;  // 分类级别(1-一级分类 2-二级分类 3-三级分类)'
    private int parentId; // 分类的父级id
    private String name; // 分类名称
    private int categoryRank;  // 分类的排序值
    private String icon;  // 分类图标
    private int enabled; // '删除标识字段(0-未删除 1-已删除)'
    private String createTime;  // 创建时间
    private String updateTime;  // 更新时间

    // 用来保存一级商品分类下的二级商品分类列表
    private List<CategoryItem> children;

    // 用来保存二级商品分类下的商品列表(理论上一级商品分类下没有商品列表，默认值为[])
    private List<GoodsItem> goods;

    public CategoryItem(int id,int categoryLevel, int parentId, String name, int categoryRank, String icon) {
        this.id = id;
        this.categoryLevel = categoryLevel;
        this.parentId = parentId;
        this.name = name;
        this.categoryRank = categoryRank;
        this.icon = icon;
    }

    public List<CategoryItem> getChildren() {
        return children;
    }

    public void setChildren(List<CategoryItem> children) {
        this.children = children;
    }

    public List<GoodsItem> getGoods() {
        return goods;
    }

    public void setGoods(List<GoodsItem> goods) {
        this.goods = goods;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public CategoryItem() {  }

    public CategoryItem(int categoryLevel, int parentId, int categoryRank, String icon) {
        this.categoryLevel = categoryLevel;
        this.parentId = parentId;
        this.categoryRank = categoryRank;
        this.icon = icon;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getCategoryLevel() {
        return categoryLevel;
    }

    public void setCategoryLevel(int categoryLevel) {
        this.categoryLevel = categoryLevel;
    }

    public int getParentId() {
        return parentId;
    }

    public void setParentId(int parentId) {
        this.parentId = parentId;
    }

    public int getCategoryRank() {
        return categoryRank;
    }

    public void setCategoryRank(int categoryRank) {
        this.categoryRank = categoryRank;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public int getEnabled() {
        return enabled;
    }

    public void setEnabled(int enabled) {
        this.enabled = enabled;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public String getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }
}
